package de.justphil.tcg.tcgserver.dummy.mock;

import java.util.HashMap;
import java.util.Map;

import de.justphil.tcg.tcgserver.commons.domain.Card;
import de.justphil.tcg.tcgserver.commons.domain.CardInstance;
import de.justphil.tcg.tcgserver.commons.domain.Property;
import de.justphil.tcg.tcgserver.commons.domain.collections.CardInstanceCollection;

public class MockDataCreator {
	
	public Map<Long, Card> getInGameCards() {
		Card bigfoot	= new Card("Bigfoot", 		4, 5, 2, 2);
		bigfoot.setId(1L);
		
		Card bullfrog	= new Card("Bullfrog", 		6, 3, 3, 3);
		bullfrog.setId(2L);
		
		Card cerberus	= new Card("Cerberus", 		3, 3, 3, 5);
		cerberus.setId(3L);
		
		Card elephant	= new Card("Elephant", 	   10, 5, 2, 3);
		elephant.setId(4L);
		
		Card elfMage	= new Card("Elf Mage", 		3, 3, 3, 3);
		elfMage.setId(5L);
		
		Card goblin		= new Card("Goblin", 		3, 4, 4, 4);
		goblin.setId(6L);
		
		Property attacker				= new Property("Attacker");
		attacker.setId(1L);
		
		Property deathExplosion			= new Property("Death Explosion");
		deathExplosion.setId(2L);
		
		Property multiAttack			= new Property("Multi Attack");
		multiAttack.setId(3L);
		
		Property paralyzingAttack		= new Property("Paralyzing Attack");
		paralyzingAttack.setId(4L);
		
		Property sleepAttack			= new Property("Sleep Attack");
		sleepAttack.setId(5L);
		
		bigfoot.getProperties().add(attacker);
		
		bullfrog.getProperties().add(attacker);
		bullfrog.getProperties().add(deathExplosion);
		
		cerberus.getProperties().add(attacker);
		cerberus.getProperties().add(multiAttack);
		
		elephant.getProperties().add(attacker);
		
		elfMage.getProperties().add(attacker);
		elfMage.getProperties().add(paralyzingAttack);
		
		goblin.getProperties().add(attacker);
		goblin.getProperties().add(sleepAttack);
		
		
		
		Card hedgehog	= new Card("Hedgehog",		2, 2, 5, 2);
		hedgehog.setId(7L);
		
		Card magicRock	= new Card("Magic Rock",	3, 0, 8, 0);
		magicRock.setId(8L);
		
		Card roadrunner = new Card("Roadrunner", 	3, 3, 1, 10);
		roadrunner.setId(9L);
		
		Card snake		= new Card("Snake", 		2, 8, 2, 3);
		snake.setId(10L);
		
		Card wildBore	= new Card("Wild Bore", 	4, 4, 3, 4);
		wildBore.setId(11L);
		
		Card wolf		= new Card("Wolf", 			3, 4, 3, 3);
		wolf.setId(12L);
		
		//Property attacker				= new Property("Attacker");
		attacker.setId(1L);
		
		Property attackDamageReflection	= new Property("Attack Damage Reflection");
		attackDamageReflection.setId(6L);
		
		Property regenerationAura		= new Property("Regeneration Aura");
		regenerationAura.setId(7L);
		
		Property resistanceAura			= new Property("Resistance Aura");
		resistanceAura.setId(8L);
		
		Property poisonResistant		= new Property("Poison Resistant");
		poisonResistant.setId(9L);
		
		Property lazy					= new Property("Lazy");
		lazy.setId(10L);
		
		Property poisonous				= new Property("Poisonous");
		poisonous.setId(11L);
		
		Property furyAura				= new Property("Fury Aura");
		furyAura.setId(12L);
		
		Property retaliation			= new Property("Retaliation");
		retaliation.setId(13L);
		
		hedgehog.getProperties().add(attacker);
		hedgehog.getProperties().add(attackDamageReflection);
		
		magicRock.getProperties().add(regenerationAura);
		magicRock.getProperties().add(resistanceAura);
		magicRock.getProperties().add(poisonResistant);
		magicRock.getProperties().add(lazy);
		
		roadrunner.getProperties().add(attacker);
		
		snake.getProperties().add(attacker);
		snake.getProperties().add(poisonous);
		snake.getProperties().add(poisonResistant);
		
		wildBore.getProperties().add(attacker);
		wildBore.getProperties().add(furyAura);
		
		wolf.getProperties().add(attacker);
		wolf.getProperties().add(retaliation);
		
		
		
		Map<Long, Card> inGameCards = new HashMap<Long, Card>(12);
		
		inGameCards.put(1L, bigfoot);
		inGameCards.put(2L, bullfrog);
		inGameCards.put(3L, cerberus);
		inGameCards.put(4L, elephant);
		
		inGameCards.put(5L, elfMage);
		inGameCards.put(6L, goblin);
		inGameCards.put(7L, hedgehog);
		inGameCards.put(8L, magicRock);
		
		inGameCards.put(9L, roadrunner);
		inGameCards.put(10L, snake);
		inGameCards.put(11L, wildBore);
		inGameCards.put(12L, wolf);
		
		return inGameCards;
	}
	
	public CardInstanceCollection createMockDeck1() {
		Card bigfoot	= new Card("Bigfoot", 		4, 5, 2, 2);
		bigfoot.setId(1L);
		
		Card bullfrog	= new Card("Bullfrog", 		6, 3, 3, 3);
		bullfrog.setId(2L);
		
		Card cerberus	= new Card("Cerberus", 		3, 3, 3, 5);
		cerberus.setId(3L);
		
		Card elephant	= new Card("Elephant", 	   10, 5, 2, 3);
		elephant.setId(4L);
		
		Card elfMage	= new Card("Elf Mage", 		3, 3, 3, 3);
		elfMage.setId(5L);
		
		Card goblin		= new Card("Goblin", 		3, 4, 4, 4);
		goblin.setId(6L);
		
		Property attacker				= new Property("Attacker");
		attacker.setId(1L);
		
		Property deathExplosion			= new Property("Death Explosion");
		deathExplosion.setId(2L);
		
		Property multiAttack			= new Property("Multi Attack");
		multiAttack.setId(3L);
		
		Property paralyzingAttack		= new Property("Paralyzing Attack");
		paralyzingAttack.setId(4L);
		
		Property sleepAttack			= new Property("Sleep Attack");
		sleepAttack.setId(5L);
		
		bigfoot.getProperties().add(attacker);
		
		bullfrog.getProperties().add(attacker);
		bullfrog.getProperties().add(deathExplosion);
		
		cerberus.getProperties().add(attacker);
		cerberus.getProperties().add(multiAttack);
		
		elephant.getProperties().add(attacker);
		
		elfMage.getProperties().add(attacker);
		elfMage.getProperties().add(paralyzingAttack);
		
		goblin.getProperties().add(attacker);
		goblin.getProperties().add(sleepAttack);
		
		CardInstance ciBigfoot		= new CardInstance(0, 0, 1L, bigfoot.getId());
		ciBigfoot.setId(100L);
		
		CardInstance ciBullfrog		= new CardInstance(0, 0, 1L, bullfrog.getId());
		ciBullfrog.setId(101L);
		
		CardInstance ciCerberus		= new CardInstance(0, 0, 1L, cerberus.getId());
		ciCerberus.setId(102L);
		
		CardInstance ciElephant		= new CardInstance(0, 0, 1L, elephant.getId());
		ciElephant.setId(103L);
		
		CardInstance ciElfMage		= new CardInstance(0, 0, 1L, elfMage.getId());
		ciElfMage.setId(104L);
		
		CardInstance ciGoblin		= new CardInstance(0, 0, 1L, goblin.getId());
		ciGoblin.setId(105L);
		
		ciBigfoot.setCardId(bigfoot.getId());
		ciBullfrog.setCardId(bullfrog.getId());
		ciCerberus.setCardId(cerberus.getId());
		ciElephant.setCardId(elephant.getId());
		ciElfMage.setCardId(elfMage.getId());
		ciGoblin.setCardId(goblin.getId());
		
		CardInstanceCollection ciList = new CardInstanceCollection(6);
		ciList.add(ciBigfoot);
		ciList.add(ciBullfrog);
		ciList.add(ciCerberus);
		ciList.add(ciElephant);
		ciList.add(ciElfMage);
		ciList.add(ciGoblin);
		
		return ciList;
	}
	
	public CardInstanceCollection createMockDeck2() {
		Card hedgehog	= new Card("Hedgehog",		2, 2, 5, 2);
		hedgehog.setId(7L);
		
		Card magicRock	= new Card("Magic Rock",	3, 0, 8, 0);
		magicRock.setId(8L);
		
		Card roadrunner = new Card("Roadrunner", 	3, 3, 1, 10);
		roadrunner.setId(9L);
		
		Card snake		= new Card("Snake", 		2, 8, 2, 3);
		snake.setId(10L);
		
		Card wildBore	= new Card("Wild Bore", 	4, 4, 3, 4);
		wildBore.setId(11L);
		
		Card wolf		= new Card("Wolf", 			3, 4, 3, 3);
		wolf.setId(12L);
		
		Property attacker				= new Property("Attacker");
		attacker.setId(1L);
		
		Property attackDamageReflection	= new Property("Attack Damage Reflection");
		attackDamageReflection.setId(6L);
		
		Property regenerationAura		= new Property("Regeneration Aura");
		regenerationAura.setId(7L);
		
		Property resistanceAura			= new Property("Resistance Aura");
		resistanceAura.setId(8L);
		
		Property poisonResistant		= new Property("Poison Resistant");
		poisonResistant.setId(9L);
		
		Property lazy					= new Property("Lazy");
		lazy.setId(10L);
		
		Property poisonous				= new Property("Poisonous");
		poisonous.setId(11L);
		
		Property furyAura				= new Property("Fury Aura");
		furyAura.setId(12L);
		
		Property retaliation			= new Property("Retaliation");
		retaliation.setId(13L);
		
		hedgehog.getProperties().add(attacker);
		hedgehog.getProperties().add(attackDamageReflection);
		
		magicRock.getProperties().add(regenerationAura);
		magicRock.getProperties().add(resistanceAura);
		magicRock.getProperties().add(poisonResistant);
		magicRock.getProperties().add(lazy);
		
		roadrunner.getProperties().add(attacker);
		
		snake.getProperties().add(attacker);
		snake.getProperties().add(poisonous);
		snake.getProperties().add(poisonResistant);
		
		wildBore.getProperties().add(attacker);
		wildBore.getProperties().add(furyAura);
		
		wolf.getProperties().add(attacker);
		wolf.getProperties().add(retaliation);
		
		CardInstance ciHedgehog		= new CardInstance(0, 0, 2L, hedgehog.getId());
		ciHedgehog.setId(106L);
		
		CardInstance ciMagicRock	= new CardInstance(0, 0, 2L, magicRock.getId());
		ciMagicRock.setId(107L);
		
		CardInstance ciRoadrunner	= new CardInstance(0, 0, 2L, roadrunner.getId());
		ciRoadrunner.setId(108L);
		
		CardInstance ciSnake		= new CardInstance(0, 0, 2L, snake.getId());
		ciSnake.setId(109L);
		
		CardInstance ciWildBore		= new CardInstance(0, 0, 2L, wildBore.getId());
		ciWildBore.setId(110L);
		
		CardInstance ciWolf			= new CardInstance(0, 0, 2L, wolf.getId());
		ciWolf.setId(111L);
		
		ciHedgehog.setCardId(hedgehog.getId());
		ciMagicRock.setCardId(magicRock.getId());
		ciRoadrunner.setCardId(roadrunner.getId());
		ciSnake.setCardId(snake.getId());
		ciWildBore.setCardId(wildBore.getId());
		ciWolf.setCardId(wolf.getId());
		
		CardInstanceCollection ciList = new CardInstanceCollection(6);
		
		ciList.add(ciHedgehog);
		ciList.add(ciMagicRock);
		ciList.add(ciRoadrunner);
		ciList.add(ciSnake);
		ciList.add(ciWildBore);
		ciList.add(ciWolf);
		
		return ciList;
	}

}
